package designmode.strategy;

/**
 * 执行机，=上下文
 */
public class Executor {
    private IStrategy strategy;

    public Executor(IStrategy strategy) {
        this.strategy = strategy;
    }

    /**
     * 对外暴露的方法
     */
    public void execute() {
        strategy.enCode();
    }
}
